<?php
// 应用公共文件


use think\facade\Config;
use think\facade\Db;

/**
 * getPayConfig
 * @return array
 */
function getPayConfig(): array
{
    // 获取V8支付配置
    $config = Config::get('v8');

    // 组装支付参数
    $alipay_config['partner'] = $config['partner'];
    $alipay_config['key'] = $config['key'];
    $alipay_config['sign_type'] = 'MD5';
    $alipay_config['input_charset'] = strtolower('utf-8');
    $alipay_config['transport'] = 'https';
    $alipay_config['apiurl'] = $config['api'];

    // 返回
    return $alipay_config;
}


/**
 * getPayConfig
 * @return array
 */
function getWxPayConfig(): array
{
    // 获取V8支付配置
    return Config::get('wx');

}
